export default {
    setUserToken(state, token) {
        state.loginUserToken = token;
        localStorage.setItem('loginUserToken', token)
    },
    setNoRefresh(state) {
        state.IsRefresh = false // 设置不刷新
    },
    loginSuccess(state, data) {//登录成功
        state.isLogin = true;
        state.loginUserInfo = data;
        localStorage.setItem('isLogin', true)
        localStorage.setItem('loginUserInfo', JSON.stringify(data))
    },
    loginOut(state) {//退出登录
        state.isLogin = false;
        state.loginUserInfo = [];
        localStorage.setItem('isLogin', false);
        localStorage.removeItem('loginUserInfo');
    }
}
